import request from "@/utils/request";

// 文章列表接口
export const articleList = params=> request({
    url:"/post",
    method: "get",
    params
})

// 栏目列表
export const category = ()=>request({
    url: "/category",
    method: "get"
})

//发布文章
export const send = data=>request({
    url: "/post",
    method: "post",
    data
})

// 文章详情
export const articleDetail = id=>request({
    url: "/post/"+id,
    method: "get"
})

// 编辑文章
export const articleUpdate = (id,data)=>request({
    url: "/post_update/"+id,
    method: "post",
    data
})